﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DPS.Prototype.Extension;
namespace DPS.Prototype.Model
{
    public enum OrderType
    {
        ApproveThisCycle,
        AbandonThisCycle,
        StartNewCycle
    }

    /// <summary>
    /// This is order sent from Policy Meaker to Produce Competitor
    /// </summary>
    [Inspect]
    public class PolicyOrder
    {
        private Dictionary<string, object> _innerBag;

        private OrderType _orderType;

        private Submission _subMission;
        
        [Inspect(OrderNo=0)]
        public OrderType OrderType
        {
            get { return this._orderType; }
        }

        [Inspect(OrderNo=1)]
        public Submission Submission
        {
            get { return this._subMission; }
            set { this._subMission = value; }
        }

        public PolicyOrder(OrderType orderType)
        {
            this._orderType = orderType;
            this._innerBag = new Dictionary<string, object>();
        }

        public object this[string index]
        {
            get
            {
                object value = null;
                this._innerBag.TryGetValue(index, out value);
                return value;
            }
            set
            {
                this._innerBag[index] = value;
            }
        }

    }
}
